<template>
    <div>
        <el-table :data="tableData" border small :row-style="{height: '30px'}" :cell-style="{padding: '0'}" style="width: 100% ;height:320px;" >
          <el-table-column fixed label="序号" type="index" width="60" />
          <!-- <el-table-column fixed prop="xuhao" label="序号" width="60"/> -->
              <el-table-column prop="dingdanhao" label="订单号" width="100" />
              <el-table-column prop="chepaihao" label="车牌号" width="100" />
              <el-table-column prop="siji" label="出车司机" width="100" />
              <el-table-column prop="chucheriqi" label="出车日期" width="110" />
              <el-table-column prop="fanhuidate" label="返回日期" width="110" />
              <el-table-column prop="yuzujin" label="预租金" width="100" />
              <el-table-column prop="yanjin" label="押金" width="100" />
              <el-table-column prop="mudidi" label="目的地" width="100" />
              <el-table-column prop="xiangmu" label="项目名称" width="100" />
              <el-table-column prop="shouche" label="是否收车" width="120" >
                <template #default>
                  <el-button link type="primary" size="small">确认收车</el-button>
                </template>
              </el-table-column>
              <el-table-column prop="licheng" label="行驶里程" width="100" />
              <el-table-column prop="hetong" label="合同上传" width="100" />
             <el-table-column prop="beizhu" label="备注" width="100" />
              <!-- <el-table-column fixed="right" label="操作" width="120">
                <template #default="scope">
                  <el-button link type="primary" size="small" @click.prevent="bianjiClick(scope.$index)"
                    >编辑</el-button>
                  <el-button link type="primary" size="small" @click.prevent="deleteInfo(scope.$index)">删除</el-button>
                </template>
              </el-table-column> -->
              
            </el-table>
    </div>
</template>

<script setup>
import { ref,watchEffect} from 'vue'

//表格绑定的数据
const tableData = ref()
//接收父组件传递的值
const props = defineProps({
       message: Object   
   })
// 当响应式的数据发生变化的时候执行函数
watchEffect(() => {
  console.log('message 变化了:', props.message)
  tableData.value = props.message.record

})
console.log(tableData.value.length)

</script>

<style lang="scss" scoped>

</style>